package nju.edu.desserthouse.model;

import java.io.Serializable;
import java.sql.Date;
import java.util.Calendar;

import javax.persistence.*;

/**
 * Entity implementation class for Entity: Vip
 *
 */
@Entity
@Table(name = "vip")
public class Vip implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private long vip_id;
	private String vip_name;
	private Date vip_birth;
	private int vip_gender;
	private String vip_addr;
	private Date vip_joindate;
	private Date vip_lastpay;
	private int vip_state;
	private double vip_totalconsume;
	private String vip_bankaccount;
	private int vip_level;
	private String vip_account;
	private String vip_password;
	private double vip_balance;
	
	public Vip(){
		super();
	}
	
	@Id
	public long getId(){
		return vip_id;
	}
	
	public void setId(long vip_id){
		this.vip_id = vip_id;
	}
	
	public String getName(){
		return vip_name;
	}
	
	public void setName(String vip_name){
		this.vip_name = vip_name;
	}
	
	public Date getBirth(){
		return vip_birth;
	}
	
	public void setBirth(Date vip_birth){
		this.vip_birth = vip_birth;
	}
	
	public int getGender(){
		return vip_gender;
	}
	
	public void setGender(int vip_gender){
		this.vip_gender = vip_gender;
	}
	
	public String getAddr(){
		return vip_addr;
	}
	
	public void setAddr(String vip_addr){
		this.vip_addr = vip_addr;
	}
	
	public Date getJoindate(){
		return vip_joindate;
	}
	
	public void setJoindate(Date vip_joindate){
		this.vip_joindate = vip_joindate;
	}
	
	public Date getLastpay(){
		return vip_lastpay;
	}
	
	public void setLastpay(Date vip_lastpay){
		this.vip_lastpay = vip_lastpay;
	}
	
	public int getState(){
		return vip_state;
	}
	
	public void setState(int vip_state){
		this.vip_state = vip_state;
	}
	
	public double getTotalconsume(){
		return vip_totalconsume;
	}
	
	public void setTotalconsume(double vip_totalconsume){
		this.vip_totalconsume = vip_totalconsume;
	}
	
	public String getBankaccount(){
		return vip_bankaccount;
	}
	
	public void setBankaccount(String vip_bankaccount){
		this.vip_bankaccount = vip_bankaccount;
	}
	
	public int getLevel(){
		return vip_level;
	}
	
	public void setLevel(int vip_level){
		this.vip_level = vip_level;
	}
	
	public String getAccount(){
		return vip_account;
	}
	
	public void setAccount(String vip_account){
		this.vip_account = vip_account;
	}
	
	public String getPassword(){
		return vip_password;
	}
	
	public void setPassword(String vip_password){
		this.vip_password = vip_password;
	}
	
	public double getBalance(){
		return vip_balance;
	}
	
	public void setBalance(double vip_balance){
		this.vip_balance = vip_balance;
	}
	
	public void setIdByDate()
	{
		Calendar datetime=Calendar.getInstance();
		this.vip_id=datetime.getTimeInMillis();
	}
}
